/*package servlet;

import hibernate.AssetChangeInfo;
import hibernate.AssetInfo;

import java.io.IOException;
import java.io.PrintWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import DAO.ReportManagementDAO;

import com.et.mvc.JsonView;

*//**
 * Servlet implementation class getProvokeServlet
 *//*
public class getProvokeServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    *//**
     * @see HttpServlet#HttpServlet()
     *//*
    public getProvokeServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	*//**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 *//*
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		
	    request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");
		response.setContentType("text/plain");
		PrintWriter out = response.getWriter();
		
        int start = Integer.parseInt(request.getParameter("start"));
        int limit = Integer.parseInt(request.getParameter("limit"));        

        String status = request.getParameter("status");
        String type = request.getParameter("type");
        String department = request.getParameter("department");
        String assetNo = request.getParameter("assetNo");
        
        ReportManagementDAO getProvokeDAO = new ReportManagementDAO();
        
        @SuppressWarnings("unused")
		List getProvokeSelectList = null;
        Map<String,Object> map = new HashMap<String,Object>();        
        
        if(status.equals("") && type.equals("") && department.equals("") 
           && assetNo.equals(""))
        {
        	getProvokeSelectList = getProvokeDAO.getAllProvoke(start , limit);         	         	 
        }           
        else
        {
        	getProvokeSelectList = getProvokeDAO.getProvokeByQuery(start, limit, assetNo, status);       	
        } 
        String assetNo2=null;
        String s = "{total:'" + getProvokeDAO.count +"',result:[";
        for(int j=0; j<getProvokeSelectList.size(); j++){
        	AssetChangeInfo assetChangeInfo = (AssetChangeInfo)getProvokeSelectList.get(j);
        	assetNo2 = assetChangeInfo.getAssetNo();        	
            List selectProvokeByAssetInfo = getProvokeDAO.getProvokeByAsset(assetNo2); 
            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
            String changeTime = null;
            for(int i=0; i<selectProvokeByAssetInfo.size(); i++){ 
     		    AssetInfo assetInfo = (AssetInfo)selectProvokeByAssetInfo.get(i);
                       
	            s = s + "{assetNo:'" + assetChangeInfo.getAssetNo() + "',";
	            s = s + "name:'" + assetChangeInfo.getName() + "',";
	            s = s + "originalUnit:'"+ assetChangeInfo.getOriginalUnit() + "',";
	            s = s + "originalPrincipal:'" + assetChangeInfo.getOriginalPrincipal() + "',";
	            s = s + "nowUnit:'" + assetChangeInfo.getNowUnit() + "',";
	            s = s + "nowPrincipal:'" + assetChangeInfo.getNowPrincipal() + "',";
	            changeTime = dateFormat.format(assetChangeInfo.getChangeTime());
	            s = s + "changeTime:'" + changeTime + "',";
	            s = s + "status:'"+ assetChangeInfo.getStatus() + "',";
	            s = s + "equipmentAttach:'" + assetChangeInfo.getEquipmentAttach() + "',";
	            s = s + "remark:'"+ assetChangeInfo.getRemark() + "',";
	            s = s + "type:'"+ assetInfo.getType() + "',";
	            s = s + "model:'"+ assetInfo.getModel() + "',";
	            s = s + "equipNumber:'"+ assetInfo.getEquipNumber() + "',";
	            s = s + "lifeYears:'"+ assetInfo.getLifeYears() + "',";
	            s = s + "department:'"+ assetInfo.getDepartment() + "'},";
            } 
        }
		String ss = "{totalCount:'" + getProvokeDAO.count + "'," + "result:[";
        if(!ss.equals(s))
        {
        	s = s.substring(0, s.length()-1);
        }
        s = s + "]}";
        out.print(s);	
		out.flush();		
	}	

	*//**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 *//*
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
*/